<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        #page{
            height: 628px;
            width: 1920px;
            font-family: "微软雅黑",Verdana, Geneva, Tahoma, sans-serif;
            font-size: 12px;
            background: #fff;
        }
        #page_head{
            height: 76px;
            width: 1920px;
            line-height: 90px;
            background: #f5f5f5;
            border-bottom: 1px solid #e5ecf0;
            overflow: hidden;
        }
        #logo{
            margin-top: 15px;
            margin-left: 580px;
            position: absolute;
        }
        #help{
            float: right;
            font-size: 14px;
            font-weight: 700;
            color: #787878;
            text-decoration: none;
            position: absolute;
            margin-left: 1500px;
            margin-top: 10px;
            outline: none;
        }
        .page_content{
            width: 964px;
            height: 460px;
            margin-top: 10px;
            margin-left: 579px;
            background-image: url(img_source/login_bg_05.jpg) ;
            position: relative;
        }
        #box{
            width: 376px;
            height: 342px;
            margin-top: 15px;
            margin-left: 200px;
            position: absolute;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
        }
        #login_h{
            width: 376px;
            height: 43px;
            color: #fff;
           
            float: left;
            font-size: 16px;
            cursor: pointer;
            background-color: rgba(255, 126, 0, 0.8);
        }
        #login_t_p{
            margin-top: 9px;
            float: left;
            margin-left: 150px;
        }
        #login_p{
            width: 22px;
            height: 40px;
            margin-top: 0em;
            margin-left: 356px;
            float: left;
            position: absolute;
        }
        #login_content{
            background: #fff;
            margin-top: 43px;
            width: 376px;
            height: 299px;
            position: absolute;
        }
        #login_tip{
            width: 334px;
            height: 21px;
            margin-left: 40px;
            font-size: 16px;
            margin-top: 15px;
        }
        #text_item{
            height: 114px;
            width: 300px;
            position: absolute;
            margin-left: 40px;
            margin-top: 10px;
            padding: 0px ;
            
            
        }
     #psw{
         height: 30px;
         width: 280px;
         border: 1px solid #c7c7c7;
     }
     #user_name{
         height: 30px;
         width: 280px;
         border: 1px solid #c7c7c7;
     }
     #tiptip{
         margin-top: 25px;
         position: absolute;
         font-size: 14px;

     }
     #remove{
         font-family: "微软雅黑",Verdana, Geneva, sans-serif;
     }
     #remove1{
         color: #999;
         text-decoration: none;
         outline: none;
     }
     #btnb{
         margin-top: 50px;
     }
     .btn{
         height: 38px;
         width: 142px;
         border: none;
         margin-right: 15px;
         font-weight: 400;
         color: #fff;
         background-color: rgb(85, 154, 223);
         font-size: 20px;
         font-family: "微软雅黑";
     }
     #login_foot{
         width: 964px;
         height: 71px;
         background-color: #f7f7f7;
         color: #999999;
         text-align: center;
         margin-left: 579px;
         position: absolute;
         line-height: 70px;
     }
    </style>
    
</head>
<body>
    <div id="page">
        <div id="page_head" >
            <div id="logo">
                <img src="img_source\login_logo.png">
            </div>
            <a id="help" href="" target="_blanck" >帮助</a>
        </div>
        <div id="page_content" class="page_content">  
            <div id="box" style="right: 60px;top: 60px;left: auto;">
                <div id="login_h">
                    <p id="login_t_p">账号登陆</p>
                    <div id="login_p">
                        <img src="img_source\dragbar.png" >
                    </div>
                </div>
                <div id="login_content">
                    <div id="login_tip"><h3 id="login_title" > 用户登录</h3></div>
                    <div id="text_item">
                        <input type="text" id="user_name"  placeholder="用户名" style="font-size: 20px; margin-top: 15px;background-color: rgb(243, 243, 243);">
                        <input type="password" id="psw" placeholder="密码" style="font-size: 20px;margin-top: 38px;background-color: rgb(243, 243, 243);">
                        <div id="tiptip">
                            <span style="float :left;color: red;font-family: 宋体;clear: both;">学生选择@stu.swpu.edu.cn </span>
                            <span id="remove" style="margin-left: 45px;" ><a id="remove1" href="" target="_blank">忘记密码</a></span>
                        </div>
                        <div id="btnb"><input type="submit" name="submit" class="btn" value="登 录" style="float: right;" onclick="Login()"></div>
                    </div>
                    
                </div>
            </div>
        </div>
        <div id="login_foot">西南石油大学</div>
    </div>
    <script>
        function Login(){
            var user=document.getElementById('user_name');
            var pw=document.getElementById('psw');
            var logintip=document.getElementById('login_title');
            if(user.value.length<=0||pw.value.length<=0){
                logintip.innerHTML='请填写用户名和密码';
                logintip.style.backgroundColor='red';
                logintip.style.height='30px';
                logintip.style.width='280px';
                logintip.style.color='white';
                logintip.style.textAlign='center';
            

            }
            else if(user.value=='tom'&&pw.value=='123'){
                window.location='https://mail.swpu.edu.cn/?permanent';
            }
            else{
                logintip.innerHTML='您填写的用户名和密码错误';
                logintip.style.backgroundColor='red';
                logintip.style.height='30px';
                logintip.style.width='280px';
                logintip.style.color='white';
                logintip.style.textAlign='center';
            }
        }
    </script>
</body>
</html>